home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991 …esperately Seeking Seven / Desperately Seeking Seven.2mg / Dev.CD.8 / Essentials / Tools / DTS.Samples / SC02BusyBox / BusyBox.asm / BusyBox.rez < prev    next >
Encoding:
Text File  |  1990-05-24  |  51.3 KB  |  2,409 lines  |  [04] ASCII Text (0x0000)

  1. /*---------------------------------------------------------------*/
  2.  
  3. #include "types.rez" 
  4.  
  5. /*------------------- Values used through out -------------------*/
  6.  
  7. #define MainWindow $2000
  8. #define ButtonWindow $2001
  9. #define StatTextWindow $2002
  10. #define LineEditWindow $2003
  11. #define PictureWindow $2004
  12. #define PopUpWindow $2005
  13. #define TextEditWindow $2006
  14. #define ListWindow $2007
  15. #define Prog1Window $2008
  16. #define Prog2Window $2009
  17. #define Prog3Window $200A
  18. #define Prog4Window $200B
  19. #define Prog5Window $200C
  20. #define Prog6Window $200D
  21.  
  22. #define ButButtons $0001
  23. #define ButStatText $0002
  24. #define ButLineEdit $0003
  25. #define ButPictures $0004
  26. #define ButPopUps $0005
  27. #define ButTextEdit $0006
  28. #define ButLists $0007
  29. #define ButProg1 $0008
  30. #define ButProg2 $0009
  31. #define ButProg3 $000A
  32. #define ButProg4 $000B
  33. #define ButProg5 $000C
  34. #define ButProg6 $000D
  35. #define MainText $000E
  36.  
  37. #define AboutBusyAlert 1
  38. #define BusyBoxStartup 1
  39.  
  40.  
  41.  
  42. /*----------------------- About Box ------------------------------*/
  43. resource rAlertString (AboutBusyAlert) {
  44.  "0\$19\$00\$A0\$00\$AA\$00\$E0\$01"
  45.  "0/"
  46.  TBCenterJust
  47.  TBStyleOutline
  48.  "Busy Box"
  49.  TBEndOfLine
  50.  TBStylePlain
  51.  "A sample program to demonstrate the new features of the Apple IIGS toolbox."
  52.  TBEndOfLine
  53.  TBEndOfLine
  54.  "by"
  55.  TBEndOfLine
  56.  "Steven E. Glass"
  57.  TBEndOfLine
  58.  TBEndOfLine
  59.  "Copyright Apple Computer, Inc."
  60.  TBEndOfLine
  61.  "All Rights Reserved"
  62.  TBEndOfLine
  63.  "Version 3.0/^#6\$00"
  64. };
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. /*----------------------Startup Record ---------------------------*/
  72. resource rToolStartup (BusyBoxStartup) {
  73.  mode640, /* master SCB */
  74.  { 
  75.         3,$0300,                        /* misc tools */
  76.         4,$0301,                        /* quickdraw */
  77.         5,$0302,                        /* desk manager */
  78.         6,$0300,                        /* eventMgr */
  79. /*      7,$0200,                        /* scheduler */
  80. /*      8,$0301,                        /* sound tools */
  81. /*      9,$0201,                        /* ADB tools */
  82. /*      10,$0202,                       /* SANE */
  83.         11,$0200,                       /* int math */
  84.         14,$0301,                       /* Window Manager */
  85.         15,$0301,                       /* Menu Manager */
  86.         16,$0301,                       /* Control Manager */
  87.         18,$0301,                       /* QD Aux */
  88.         19,$0300,                       /* print manager */
  89.         20,$0301,                       /* LineEdit tool set */
  90.         21,$0302,                       /* Dialog Manager */
  91.         22,$0300,                       /* Scrap manager */
  92.         23,$0301,                       /* standard file */
  93. /*      25,$0104,                       /* NoteSynth */
  94. /*      26,$0104,                       /* Note Seq */
  95.         27,$0301,                       /* Font manager */
  96.         28,$0301,                       /* list manager */
  97. /*      29,$0101,                       /* ACE */
  98. /*      32,$0103,                       /* Midi Tools */
  99.         34,$0101                        /* text edit */
  100.  }
  101. };
  102.  
  103.  
  104.  
  105.  
  106. /*---------------------------------------------------------------------------*/
  107. /*
  108. /* Main Window
  109. /*
  110. /* This is the template for the main window with all the buttons that lead
  111. /* to other buttons.
  112. /*
  113. /*---------------------------------------------------------------------------*/
  114. resource rWindParam1 (MainWindow) {
  115.  fTitle+fVis, /* Frame Bits */
  116.  MainWindow, /* title ID */
  117.  0, /* ref Con */
  118.  {0,0,0,0}, /* Zoom Rect */
  119.  0, /* color table id */
  120.  {0,0}, /* origin */
  121.  {0,0}, /* data size */
  122.  {0,0}, /* max height-width */
  123.  {0,0}, /* scroll amount, hor,ver */
  124.  {0,0}, /* page amount */
  125.  0, /* wInfo Ref Con */
  126.  0, /* wInfo height */
  127.  {40,90,180,550}, /* window Position */
  128.  infront, /* wPlane */
  129.  MainWindow, /* Control Ref */
  130.  refIsResource*0x0100+resourceToResource /* descriptor */
  131. };
  132.  
  133. /*---------------------------------------------------------------------------*/
  134. /* This is the title of the main window
  135. /*---------------------------------------------------------------------------*/
  136. resource rPString (MainWindow) {
  137.  "Busy Box"
  138.  };
  139.  
  140.  
  141.  
  142. /*---------------------------------------------------------------------------*/
  143. /* The following define the controls for the main window.
  144. /* First I start with some constants.
  145. /*---------------------------------------------------------------------------*/
  146.  
  147. #define ButWidth 140
  148. #define ButHeight 12
  149. #define ButSep 8
  150. #define ButVSep 5
  151.  
  152. #define TopOfRow1 50
  153. #define BottomOfRow1 TopOfRow1+ButHeight
  154. #define TopOfRow2 BottomOfRow1+ButVSep
  155. #define BottomOfRow2 TopOfRow2+ButHeight
  156. #define TopOfRow3 BottomOfRow2+ButVSep
  157. #define BottomOfRow3 TopOfRow3+ButHeight
  158. #define TopOfRow4 BottomOfRow3+ButVSep+ButVSep
  159. #define BottomOfRow4 TopOfRow4+ButHeight
  160. #define TopOfRow5 BottomOfRow4+ButVSep
  161. #define BottomOfRow5 TopOfRow5+ButHeight
  162.  
  163. #define LeftEdge1 ButSep
  164. #define RightEdge1 LeftEdge1+ButWidth
  165. #define LeftEdge2 RightEdge1+ButSep
  166. #define RightEdge2 LeftEdge2+ButWidth
  167. #define LeftEdge3 RightEdge2+ButSep
  168. #define RightEdge3 LeftEdge3+ButWidth
  169.  
  170.  
  171. /* List of all controls in Main Window */
  172.  
  173. resource rControlList (MainWindow) {
  174.  {
  175.  ButButtons,
  176.  ButStatText,
  177.  ButLineEdit,
  178.  ButPictures,
  179.  ButPopUps,
  180.  ButTextEdit,
  181.  ButLists,
  182.  ButProg1,
  183.  ButProg2,
  184.  ButProg3,
  185.  ButProg4,
  186.  ButProg5,
  187.  ButProg6,
  188.  MainText
  189.  };
  190. };
  191.  
  192. resource rControlTemplate (MainText) {
  193.  MainText, /* control ID */
  194.  {2,4,42,456}, /* control rectangle */
  195.  EditTextControl{{ /* control type */
  196.  0x0000, /* flag */
  197.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr, /* more flags */
  198.  0, /* ref con */
  199.  fReadOnly+fDrawBounds, /* text flags */
  200.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  201.  0xFFFFFFFF, /* Vert Bar */
  202.  0, /* Vert Amount */
  203.  0, /* hor bar */
  204.  0, /* hor Amount */
  205.  0, /* style ref */
  206.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  207.  MainText, /* text ref */
  208.  0 /* text size (not used) */
  209.  
  210.  
  211.  }};
  212. };
  213.  
  214.  
  215. /* The static text for main window */
  216. resource rText (MainText) {
  217.  "The new toolbox makes it much easier to write programs for the Apple IIGS. "
  218.  TBEndOfLine
  219.  TBEndOfLine
  220.  "This program is incredibly simple. "
  221.  TBEndOfLine
  222.  TBEndOfLine
  223.  "Press one of the round buttons "
  224.  "to find out about the new kinds of controls that are supported. "
  225.  TBEndOfLine
  226.  TBEndOfLine
  227.  "Press one of the square "
  228.  "buttons to see the code for this program."
  229. };
  230.  
  231. /* The definition of the buttons button */
  232. resource rControlTemplate (ButButtons) {
  233.  ButButtons, /* control ID */
  234.  {TopOfRow1,LeftEdge1,BottomOfRow1,RightEdge1}, /* control rect */
  235.  SimpleButtonControl{{ /* control type */
  236.  0, /* flag */
  237.  0x1002, /* more flags */
  238.  0, /* ref con */
  239.  ButButtons /* title ref */
  240.  }};
  241. };
  242.  
  243. resource rpString (ButButtons) {
  244.  "Buttons..."
  245. };
  246.  
  247. /* the Static Text Button */
  248. resource rControlTemplate (ButStatText) {
  249.  ButStatText, /* control id */
  250.  {TopOfRow1,LeftEdge2,BottomOfRow1,RightEdge2}, /* control rect */
  251.  SimpleButtonControl{{ /* control type */
  252.  0, /* flag */
  253.  0x1002, /* more flags */
  254.  0, /* ref con */
  255.  ButStatText /* title ref */
  256.  }};
  257. }; 
  258.  
  259. resource rpString (ButStatText) {
  260.  "Static Text..."
  261. };
  262.  
  263. /* The Line Edit button. */
  264. resource rControlTemplate (ButLineEdit) {
  265.  ButLineEdit, /* control ID */
  266.  {TopOfRow1,LeftEdge3,BottomOfRow1,RightEdge3}, /* control rect */
  267.  SimpleButtonControl{{ /* control type */
  268.  0, /* flag */
  269.  0x1002, /* more flags */
  270.  0, /* ref con */
  271.  ButLineEdit /* title ref */
  272.  }};
  273. }; 
  274.  
  275. resource rpString (ButLineEdit) {
  276.  "Line Edit..."
  277. };
  278.  
  279. /* the pictures button */
  280. resource rControlTemplate (ButPictures) {
  281.  ButPictures, /* control ID */
  282.  {TopOfRow2,LeftEdge1,BottomOfRow2,RightEdge1}, /* control rect */
  283.  SimpleButtonControl{{ /* button type */
  284.  0, /* flag */
  285.  0x1002, /* more flags */
  286.  0, /* ref con */
  287.  ButPictures /* title ref */
  288.  }};
  289. }; 
  290.  
  291. resource rpString (ButPictures) {
  292.  "Pictures..."
  293. };
  294.  
  295.  
  296. /* The pop-ups button */
  297. resource rControlTemplate (ButPopUps) {
  298.  ButPopUps, /* control ID */
  299.  {TopOfRow2,LeftEdge2,BottomOfRow2,RightEdge2}, /* control rect */
  300.  SimpleButtonControl{{ /* control type */
  301.  0, /* flag */
  302.  0x3002, /* more flags */
  303.  0, /* ref con */
  304.  ButPopUps /* title ref */
  305.  }};
  306. }; 
  307.  
  308. resource rpString (ButPopUps) {
  309.  "Pop-up Menus..."
  310. };
  311.  
  312.  
  313. /* the text edit button */
  314. resource rControlTemplate (ButTextEdit) {
  315.  ButTextEdit, /* control ID */
  316.  {TopOfRow2,LeftEdge3,BottomOfRow2,RightEdge3}, /* control rect */
  317.  SimpleButtonControl{{ /* control type */
  318.  0, /* flag */
  319.  0x1002, /* more flags */
  320.  0, /* ref con */
  321.  ButTextEdit /* title ref */
  322.  }};
  323. }; 
  324.  
  325. resource rpString (ButTextEdit) {
  326.  "Text Edit..."
  327. };
  328.  
  329.  
  330. /* the lists button */
  331. resource rControlTemplate (ButLists) {
  332.  ButLists, /* control ID */
  333.  {TopOfRow3,LeftEdge2,BottomOfRow3,RightEdge2}, /* control rect */
  334.  SimpleButtonControl{{ /* control type */
  335.  0, /* flag */
  336.  0x3002, /* more flags */
  337.  0, /* ref con */
  338.  ButLists /* title ref */
  339.  }};
  340. }; 
  341.  
  342. resource rpString (ButLists) {
  343.  "Lists..."
  344. };
  345.  
  346.  
  347. /* the main program button */
  348. resource rControlTemplate (ButProg1) {
  349.  ButProg1, /* control ID */
  350.  {TopOfRow4,LeftEdge1,BottomOfRow4,RightEdge1}, /* control rect */
  351.  SimpleButtonControl{{ /* control type */
  352.  SquareButton, /* flag */
  353.  0x3002, /* more flags */
  354.  0, /* ref con */
  355.  ButProg1 /* title ref */
  356.  }};
  357. }; 
  358.  
  359. resource rpString (ButProg1) {
  360.  "Main Program..."
  361. };
  362.  
  363. /* the main program button */
  364. resource rControlTemplate (ButProg2) {
  365.  ButProg2, /* control ID */
  366.  {TopOfRow4,LeftEdge2,BottomOfRow4,RightEdge2}, /* control rect */
  367.  SimpleButtonControl{{ /* control type */
  368.  SquareButton, /* flag */
  369.  0x3002, /* more flags */
  370.  0, /* ref con */
  371.  ButProg2 /* title ref */
  372.  }};
  373. }; 
  374.  
  375. resource rpString (ButProg2) {
  376.  "Events..."
  377. };
  378.  
  379. /* the main program button */
  380. resource rControlTemplate (ButProg3) {
  381.  ButProg3, /* control ID */
  382.  {TopOfRow4,LeftEdge3,BottomOfRow4,RightEdge3}, /* control rect */
  383.  SimpleButtonControl{{ /* control type */
  384.  SquareButton, /* flag */
  385.  0x3002, /* more flags */
  386.  0, /* ref con */
  387.  ButProg3 /* title ref */
  388.  }};
  389. }; 
  390.  
  391. resource rpString (ButProg3) {
  392.  "Menus..."
  393. };
  394.  
  395. /* the main program button */
  396. resource rControlTemplate (ButProg4) {
  397.  ButProg4, /* control ID */
  398.  {TopOfRow5,LeftEdge1,BottomOfRow5,RightEdge1}, /* control rect */
  399.  SimpleButtonControl{{ /* control type */
  400.  SquareButton, /* flag */
  401.  0x3002, /* more flags */
  402.  0, /* ref con */
  403.  ButProg4 /* title ref */
  404.  }};
  405. }; 
  406.  
  407. resource rpString (ButProg4) {
  408.  "Windows..."
  409. };
  410.  
  411. /* the main program button */
  412. resource rControlTemplate (ButProg5) {
  413.  ButProg5, /* control ID */
  414.  {TopOfRow5,LeftEdge2,BottomOfRow5,RightEdge2}, /* control rect */
  415.  SimpleButtonControl{{ /* control type */
  416.  SquareButton, /* flag */
  417.  0x3002, /* more flags */
  418.  0, /* ref con */
  419.  ButProg5 /* title ref */
  420.  }};
  421. }; 
  422.  
  423. resource rpString (ButProg5) {
  424.  "Utilities..."
  425. };
  426.  
  427. /* the main program button */
  428. resource rControlTemplate (ButProg6) {
  429.  ButProg6, /* control ID */
  430.  {TopOfRow5,LeftEdge3,BottomOfRow5,RightEdge3}, /* control rect */
  431.  SimpleButtonControl{{ /* control type */
  432.  SquareButton, /* flag */
  433.  0x3002, /* more flags */
  434.  0, /* ref con */
  435.  ButProg6 /* title ref */
  436.  }};
  437. }; 
  438.  
  439. resource rpString (ButProg6) {
  440.  "Globals..."
  441. };
  442.  
  443.  
  444.  
  445.  
  446.  
  447. /*---------------------------------------------------------------------------*/
  448. /*
  449. /* Buttons...
  450. /*
  451. /* The List window uses ID's in the $3000 range.
  452. /*
  453. /*---------------------------------------------------------------------------*/
  454.  
  455. #define ButtonTextID $3001
  456. #define But1 $3101
  457. #define But2 $3102
  458. #define But3 $3103
  459. #define But4 $3104
  460. #define Check1 $3105
  461. #define Check2 $3106
  462. #define Check3 $3107
  463. #define Check4 $3108
  464. #define Radio1 $3109
  465. #define Radio2 $310A
  466. #define Radio3 $310B
  467. #define Radio4 $310C
  468. #define Icon1 $310D
  469. #define Icon2 $310E
  470.  
  471.  
  472.  
  473.  
  474. #define BLine1 50
  475. #define BLine2 BLine1+18
  476. #define BLine3 BLine2+18
  477. #define BLine4 BLine3+18
  478.  
  479.  
  480. resource rWindParam1 (ButtonWindow) {
  481.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  482.  ButtonWindow, /* title ID */
  483.  0, /* ref Con */
  484.  {0,0,0,0}, /* Zoom Rect */
  485.  0, /* color table id */
  486.  {0,0}, /* origin */
  487.  {400,640}, /* data size */
  488.  {200,640}, /* max height-width */
  489.  {1,1}, /* scroll amount, hor,ver */
  490.  {0,0}, /* page amount */
  491.  0, /* wInfo Ref Con */
  492.  0, /* wInfo height */
  493.  {50,50,120,260}, /* window Position */
  494.  infront, /* wPlane */
  495.  ButtonWindow, /* Control Ref */
  496.  refIsResource*0x0100+resourceToResource /* descriptor */
  497. };
  498.  
  499.  
  500.  
  501. resource rpString (ButtonWindow) {
  502.  "Buttons Window"
  503. };
  504.  
  505.  
  506. resource rControlList (ButtonWindow) {
  507.  {
  508.  ButtonTextID,
  509.  But1,
  510.  But2,
  511.  But3,
  512.  But4,
  513.  Check1,
  514.  Check2,
  515.  Check3,
  516.  Check4,
  517.  Radio1,
  518.  Radio2,
  519.  Radio3,
  520.  Radio4,
  521.  Icon1,
  522.  Icon2
  523.  };
  524. };
  525.  
  526. /* Template for static text in main window */
  527. resource rControlTemplate (ButtonTextID) {
  528.  ButtonTextID, /* control ID */
  529.  {2,4,48,460}, /* control rectangle */
  530.  StatTextControl{{ /* control type */
  531.  0xFF00, /* flag */
  532.  0x1002, /* more flags */
  533.  0, /* ref con */
  534.  ButtonTextID /* title ref */
  535.  }};
  536. }; 
  537.  
  538. /* The static text for list window */
  539. resource rTextForLETextBox2 (ButtonTextID) {
  540.  "There are four types of buttons: simple buttons, check boxes, radio buttons and "
  541.  "Icon Buttons. Each button can have its own keyboard equivalent. All tracking and "
  542.  "hiliting is handled by TaskMaster."
  543. };
  544.  
  545. resource rControlTemplate (But1) {
  546.  But1, /* control ID */
  547.  {BLine1,LeftEdge1,0,0}, /* control rect */
  548.  SimpleButtonControl{{ /* control type */
  549.  NormalButton, /* flag */
  550.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  551.  0, /* ref con */
  552.  But1, /* title ref */
  553.  0, /* color table not used */
  554.  {"A","a",0,0} /* key equiv */
  555.  }};
  556. }; 
  557.  
  558. resource rpString (But1) {
  559.  "Normal Button (A)"
  560. };
  561.  
  562.  
  563. resource rControlTemplate (But2) {
  564.  But2, /* control ID */
  565.  {BLine2,LeftEdge1,0,0}, /* control rect */
  566.  SimpleButtonControl{{ /* control type */
  567.  DefaultButton, /* flag */
  568.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  569.  0, /* ref con */
  570.  But2, /* title ref */
  571.  0, /* color table not used */
  572.  {"B","b",0,0} /* key equiv */
  573.  }};
  574. }; 
  575.  
  576. resource rpString (But2) {
  577.  "Default Button (B)"
  578. };
  579.  
  580.  
  581. resource rControlTemplate (But3) {
  582.  But3, /* control ID */
  583.  {BLine3,LeftEdge1,0,0}, /* control rect */
  584.  SimpleButtonControl{{ /* control type */
  585.  SquareButton, /* flag */
  586.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  587.  0, /* ref con */
  588.  But3, /* title ref */
  589.  0, /* color table not used */
  590.  {"C","c",0,0} /* key equiv */
  591.  }};
  592. }; 
  593.  
  594. resource rpString (But3) {
  595.  "Square Button (C)"
  596. };
  597.  
  598.  
  599. resource rControlTemplate (But4) {
  600.  But4, /* control ID */
  601.  {BLine4,LeftEdge1,0,0}, /* control rect */
  602.  SimpleButtonControl{{ /* control type */
  603.  SquareShadowButton, /* flag */
  604.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  605.  0, /* ref con */
  606.  But4, /* title ref */
  607.  0, /* color table not used */
  608.  {"D","d",0,0} /* key equiv */
  609.  }};
  610. }; 
  611.  
  612. resource rpString (But4) {
  613.  "Square Shadow Button (D)"
  614. };
  615.  
  616. resource rControlTemplate (Check1) {
  617.  Check1, /* control ID */
  618.  {BLine1,LeftEdge3,0,0}, /* control rect */
  619.  CheckControl{{ /* control type */
  620.  0, /* flag */
  621.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  622.  0, /* ref con */
  623.  Check1, /* title ref */
  624.  1, /* initial value */
  625.  0, /* color table not used */
  626.  {"e","E",0,0} /* key equiv */
  627.  }};
  628. }; 
  629.  
  630. resource rpString (Check1) {
  631.  "Check One (E)"
  632. };
  633.  
  634. resource rControlTemplate (Check2) {
  635.  Check2, /* control ID */
  636.  {BLine1+10,LeftEdge3,0,0}, /* control rect */
  637.  CheckControl{{ /* control type */
  638.  0, /* flag */
  639.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  640.  0, /* ref con */
  641.  Check2, /* title ref */
  642.  1, /* initial value */
  643.  0, /* color table not used */
  644.  {"f","F",0,0} /* key equiv */
  645.  }};
  646. }; 
  647.  
  648. resource rpString (Check2) {
  649.  "Check Two (F)"
  650. };
  651.  
  652. resource rControlTemplate (Check3) {
  653.  Check3, /* control ID */
  654.  {BLine1+20,LeftEdge3,0,0}, /* control rect */
  655.  CheckControl{{ /* control type */
  656.  0, /* flag */
  657.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  658.  0, /* ref con */
  659.  Check3, /* title ref */
  660.  0, /* initial value */
  661.  0, /* color table not used */
  662.  {"G","g",0,0} /* key equiv */
  663.  }};
  664. }; 
  665.  
  666. resource rpString (Check3) {
  667.  "Check Three (G)"
  668. };
  669.  
  670. resource rControlTemplate (Check4) {
  671.  Check4, /* control ID */
  672.  {BLine1+30,LeftEdge3,0,0}, /* control rect */
  673.  CheckControl{{ /* control type */
  674.  0, /* flag */
  675.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  676.  0, /* ref con */
  677.  Check4, /* title ref */
  678.  1, /* initial value */
  679.  0, /* color table not used */
  680.  {"H","h",0,0} /* key equiv */
  681.  }};
  682. }; 
  683.  
  684. resource rpString (Check4) {
  685.  "Check Four (H)"
  686. };
  687.  
  688. resource rControlTemplate (Radio1) {
  689.  Radio1, /* control ID */
  690.  {BLine4,LeftEdge3,0,0}, /* control rect */
  691.  RadioControl{{ /* control type */
  692.  0, /* flag */
  693.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  694.  0, /* ref con */
  695.  Radio1, /* title ref */
  696.  0, /* initial value */
  697.  0, /* color table not used */
  698.  {"i","I",0,0} /* key equiv */
  699.  }};
  700. }; 
  701.  
  702. resource rpString (Radio1) {
  703.  "Radio One (I)"
  704. };
  705.  
  706. resource rControlTemplate (Radio2) {
  707.  Radio2, /* control ID */
  708.  {BLine4+10,LeftEdge3,0,0}, /* control rect */
  709.  RadioControl{{ /* control type */
  710.  0, /* flag */
  711.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  712.  0, /* ref con */
  713.  Radio2, /* title ref */
  714.  1, /* initial value */
  715.  0, /* color table not used */
  716.  {"J","j",0,0} /* key equiv */
  717.  }};
  718. }; 
  719.  
  720. resource rpString (Radio2) {
  721.  "Radio Two (J)"
  722. };
  723.  
  724. resource rControlTemplate (Radio3) {
  725.  Radio3, /* control ID */
  726.  {BLine4+20,LeftEdge3,0,0}, /* control rect */
  727.  RadioControl{{ /* control type */
  728.  0, /* flag */
  729.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  730.  0, /* ref con */
  731.  Radio3, /* title ref */
  732.  0, /* initial value */
  733.  0, /* color table not used */
  734.  {"K","k",0,0} /* key equiv */
  735.  }};
  736. }; 
  737.  
  738. resource rpString (Radio3) {
  739.  "Radio Three (K)"
  740. };
  741.  
  742. resource rControlTemplate (Radio4) {
  743.  Radio4, /* control ID */
  744.  {BLine4+30,LeftEdge3,0,0}, /* control rect */
  745.  RadioControl{{ /* control type */
  746.  0, /* flag */
  747.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource, /* more flags */
  748.  0, /* ref con */
  749.  Radio4, /* title ref */
  750.  0, /* initial value */
  751.  0, /* color table not used */
  752.  {"L","l",0,0} /* key equiv */
  753.  }};
  754. }; 
  755.  
  756. resource rpString (Radio4) {
  757.  "Radio Four (L)"
  758. };
  759.  
  760.  
  761. resource rControlTemplate (Icon1) {
  762.  Icon1, /* control ID */
  763.  {BLine4+20,LeftEdge1,BLine4+20+40,LeftEdge1+100}, /* control rect */
  764.  IconButtonControl{{ /* control type */
  765.  SquareButton, /* flag */
  766.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource+RefIsResource*$0010, /* more flags */
  767.  0, /* ref con */
  768.  Icon1, /* Icon Ref */
  769.  Icon1, /* title ref */
  770.  0, /* color table not used */
  771.  0, /* display mode */
  772.  {"M","m",0,0}  /* key equiv */
  773.  }};
  774. }; 
  775.  
  776. resource rpString (Icon1) {
  777.  "Icon One (M)"
  778. };
  779.  
  780. resource rIcon (Icon1) {
  781.  0x8000, /* Kind */
  782.  20, /* Height */
  783.  28, /* Width */
  784.  
  785.  $"FFFFFFFFFFF00000FFFFFFFFFFFF"
  786.  $"FFFFFFFF000ddddd000FFFFFFFFF"
  787.  $"FFFFFF0088888dddddd00FFFFFFF"
  788.  $"FFFFF0d888888d888dd8d0FFFFFF"
  789.  $"FFFF08888888dd888dd8880FFFFF"
  790.  $"FFFF08888888dd88dd88880FFFFF"
  791.  $"FFF08888888dddddddd88880FFFF"
  792.  $"FFF08888888dddddddddd8d0FFFF"
  793.  $"FF0d8d88dd8ddddddd8888880FFF"
  794.  $"FF0d8d88dd8dddddd88888880FFF"
  795.  $"FF0dddd8ddddddddd88888880FFF"
  796.  $"FF0dd88888ddddddd88888880FFF"
  797.  $"FFF08888888dddddd8888880FFFF"
  798.  $"FFF08888888ddddddd888880FFFF"
  799.  $"FFFF0888888dddddddd8880FFFFF"
  800.  $"FFFF088888ddddddddd8880FFFFF"
  801.  $"FFFFF08888ddddddddd880FFFFFF"
  802.  $"FFFFFF008dddddddddd00FFFFFFF"
  803.  $"FFFFFFFF000ddddd000FFFFFFFFF"
  804.  $"FFFFFFFFFFF00000FFFFFFFFFFFF",
  805.  
  806.  $"00000000000FFFFF000000000000"
  807.  $"00000000FFFFFFFFFFF000000000"
  808.  $"000000FFFFFFFFFFFFFFF0000000"
  809.  $"00000FFFFFFFFFFFFFFFFF000000"
  810.  $"0000FFFFFFFFFFFFFFFFFFF00000"
  811.  $"0000FFFFFFFFFFFFFFFFFFF00000"
  812.  $"000FFFFFFFFFFFFFFFFFFFFF0000"
  813.  $"000FFFFFFFFFFFFFFFFFFFFF0000"
  814.  $"00FFFFFFFFFFFFFFFFFFFFFFF000"
  815.  $"00FFFFFFFFFFFFFFFFFFFFFFF000"
  816.  $"00FFFFFFFFFFFFFFFFFFFFFFF000"
  817.  $"00FFFFFFFFFFFFFFFFFFFFFFF000"
  818.  $"000FFFFFFFFFFFFFFFFFFFFF0000"
  819.  $"000FFFFFFFFFFFFFFFFFFFFF0000"
  820.  $"0000FFFFFFFFFFFFFFFFFFF00000"
  821.  $"0000FFFFFFFFFFFFFFFFFFF00000"
  822.  $"00000FFFFFFFFFFFFFFFFF000000"
  823.  $"000000FFFFFFFFFFFFFFF0000000"
  824.  $"00000000FFFFFFFFFFF000000000"
  825.  $"00000000000FFFFF000000000000";
  826. };
  827.  
  828.  
  829. resource rControlTemplate (Icon2) {
  830.  Icon2, /* control ID */
  831.  {BLine4+20,LeftEdge2,BLine4+20+40,LeftEdge2+100}, /* control rect */
  832.  IconButtonControl{{ /* control type */
  833.  SquareButton, /* flag */
  834.  fctlProcNotPtr+fCtlWantsEvents+RefIsResource+RefIsResource*$0010, /* more flags */
  835.  0, /* ref con */
  836.  Icon2, /* Icon Ref */
  837.  Icon2, /* title ref */
  838.  0, /* color table not used */
  839.  0, /* display mode */
  840.  {"N","n",0,0}  /* key equiv */
  841.  }};
  842. }; 
  843.  
  844. resource rpString (Icon2) {
  845.  "Icon Two (N)"
  846. };
  847.  
  848. resource rIcon (Icon2) {
  849.  0x8000, /* Kind */
  850.  20, /* Height */
  851.  28, /* Width */
  852.  
  853.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  854.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  855.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  856.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  857.  $"FFFFFFFFFF0FFFFFFFFFDFFFFFFF"
  858.  $"FFFFFFFFF00FFFFFFFEFFDFFFFFF"
  859.  $"FFFFFFFF0F0FFFFFAFFEFFDFFFFF"
  860.  $"FFFFFFF0FF0FF7FFAFFEFFDFFFFF"
  861.  $"FF00000FFF0FFF7FFAFFEFFDFFFF"
  862.  $"F0FFFF0FFF0FFF7FFAFFEFFDFFFF"
  863.  $"F0FFFF0FFF0FFF7FFAFFEFFDFFFF"
  864.  $"F0FFFF0FFF0FFF7FFAFFEFFDFFFF"
  865.  $"FF00000FFF0FFF7FFAFFEFFDFFFF"
  866.  $"FFFFFFF0FF0FF7FFAFFEFFDFFFFF"
  867.  $"FFFFFFFF0F0FFFFFAFFEFFDFFFFF"
  868.  $"FFFFFFFFF00FFFFFFFEFFDFFFFFF"
  869.  $"FFFFFFFFFF0FFFFFFFFFDFFFFFFF"
  870.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  871.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
  872.  $"FFFFFFFFFFFFFFFFFFFFFFFFFFFF",
  873.  
  874.  $"0000000000000000000000000000"
  875.  $"0000000000000000000000000000"
  876.  $"0000000000000000000000000000"
  877.  $"0000000000000000000000000000"
  878.  $"0000000000F000000000F0000000"
  879.  $"000000000FF0000000F00F000000"
  880.  $"00000000FFF00000F00F00F00000"
  881.  $"0000000FFFF00F00F00F00F00000"
  882.  $"00FFFFFFFFF000F00F00F00F0000"
  883.  $"0FFFFFFFFFF000F00F00F00F0000"
  884.  $"0FFFFFFFFFF000F00F00F00F0000"
  885.  $"0FFFFFFFFFF000F00F00F00F0000"
  886.  $"00FFFFFFFFF000F00F00F00F0000"
  887.  $"0000000FFFF00F00F00F00F00000"
  888.  $"00000000FFF00000F00F00F00000"
  889.  $"000000000FF0000000F00F000000"
  890.  $"0000000000F000000000F0000000"
  891.  $"0000000000000000000000000000"
  892.  $"0000000000000000000000000000"
  893.  $"0000000000000000000000000000";
  894.  
  895.  
  896.  
  897. };
  898.  
  899. /*---------------------------------------------------------------------------*/
  900. /*
  901. /* StatText...
  902. /*
  903. /* The StatText window uses ID's in the $4000 range.
  904. /*
  905. /*---------------------------------------------------------------------------*/
  906.  
  907. #define StatTextTextID $4001
  908.  
  909. resource rWindParam1 (StatTextWindow) {
  910.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  911.  StatTextWindow, /* title ID */
  912.  0, /* ref Con */
  913.  {0,0,0,0}, /* Zoom Rect */
  914.  0, /* color table id */
  915.  {0,0}, /* origin */
  916.  {400,640}, /* data size */
  917.  {200,640}, /* max height-width */
  918.  {1,1}, /* scroll amount, hor,ver */
  919.  {0,0}, /* page amount */
  920.  0, /* wInfo Ref Con */
  921.  0, /* wInfo height */
  922.  {50,50,120,260}, /* window Position */
  923.  infront, /* wPlane */
  924.  StatTextWindow, /* Control Ref */
  925.  refIsResource*0x0100+resourceToResource /* descriptor */
  926. };
  927.  
  928.  
  929.  
  930. resource rpString (StatTextWindow) {
  931.  "Static Text Window"
  932. };
  933.  
  934.  
  935. resource rControlList (StatTextWindow) {
  936.  {
  937.  StatTextTextID,
  938.  0
  939.  };
  940. };
  941.  
  942. /* Template for static text in main window */
  943. resource rControlTemplate (StatTextTextID) {
  944.  StatTextTextID, /* control ID */
  945.  {2,4,200,560}, /* control rectangle */
  946.  StatTextControl{{ /* control type */
  947.  0xFF00+fSubstituteText, /* flag */
  948.  fctlProcNotPtr+RefIsResource, /* more flags */
  949.  0, /* ref con */
  950.  StatTextTextID /* title ref */
  951.  }};
  952. }; 
  953.  
  954. /* The static text for list window */
  955. resource rTextForLETextBox2 (StatTextTextID) {
  956.  "Static text is a simple but powerful control that lets you put pre-defined text "
  957.  "in a window. The text is drawn with LETextBox2 so you can format the text any "
  958.  "way you want: using special "
  959.  TBStyleOutline
  960.  "styles"
  961.  TBStylePlain
  962.  ", "
  963.  TBFont
  964.  TBVenice
  965.  "\$00\$0E"
  966.  "fonts"
  967.  TBFont
  968.  TBShaston
  969.  "\$00\$08"
  970.  ", "
  971.  TBForeColor
  972.  TBColor5
  973.  "colors"
  974.  TBForeColor
  975.  TBColor0
  976.  ","
  977.  TBEndOfLine
  978.  TBRightJust
  979.  "indenting or justification. "
  980.  TBEndOfLine
  981.  TBLeftJust
  982.  TBEndOfLine
  983.  "An additional feature of static text is substitutions. You may substitute up "
  984.  "to ten strings into your ""static"" text, making it not so static. The ## and ** "
  985.  "symbols are used to indicate substitutions. You use ##n to indicate a built in string. "
  986.  "You use **n to indicate a particular string of your own. The SetCtlParamPtr call lets "
  987.  "you set up the substitution array that should be used."
  988.  TBEndOfLine
  989.  TBEndOfLine
  990.  "The built in strings are"
  991.  TBEndOfLine
  992.  TBEndOfLine
  993.  TBLeftMargin
  994.  "\$20\$00"
  995.  "##0 is #0"
  996.  TBEndOfLine
  997.  "##1 is ""#1"""
  998.  TBEndOfLine
  999.  "##2 is ""#2"""
  1000.  TBEndOfLine
  1001.  "##3 is ""#3"""
  1002.  TBEndOfLine
  1003.  "##4 is ""#4"""
  1004.  TBEndOfLine
  1005.  "##5 is ""#5"""
  1006.  TBEndOfLine
  1007.  "##6 is ""#6"""
  1008.  TBEndOfLine
  1009. };
  1010.  
  1011. /*---------------------------------------------------------------------------*/
  1012. /*
  1013. /* LineEdit...
  1014. /*
  1015. /* The List window uses ID's in the $5000 range.
  1016. /*
  1017. /*---------------------------------------------------------------------------*/
  1018.  
  1019. #define LineEditTextID $5001
  1020. #define LineEdit1 $5002
  1021. #define LineEdit2 $5003
  1022. #define LineEdit3 $5004
  1023. #define LineEdit4 $5005
  1024. #define LineEdit5 $5006
  1025. #define LineEdit6 $5007
  1026.  
  1027.  
  1028. #define LELine1 80
  1029. #define LELine2 100
  1030. #define LELine3 120
  1031. #define LELeft1 10
  1032. #define LEWidth 200
  1033. #define LEHeight 13
  1034. #define LELeft2 220
  1035.  
  1036. resource rWindParam1 (LineEditWindow) {
  1037.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  1038.  LineEditWindow, /* title ID */
  1039.  0, /* ref Con */
  1040.  {0,0,0,0}, /* Zoom Rect */
  1041.  0, /* color table id */
  1042.  {0,0}, /* origin */
  1043.  {400,640}, /* data size */
  1044.  {200,640}, /* max height-width */
  1045.  {1,1}, /* scroll amount, hor,ver */
  1046.  {0,0}, /* page amount */
  1047.  0, /* wInfo Ref Con */
  1048.  0, /* wInfo height */
  1049.  {50,50,120,260}, /* window Position */
  1050.  infront, /* wPlane */
  1051.  LineEditWindow, /* Control Ref */
  1052.  refIsResource*0x0100+resourceToResource /* descriptor */
  1053. };
  1054.  
  1055.  
  1056.  
  1057. resource rpString (LineEditWindow) {
  1058.  "Line Edit Window"
  1059. };
  1060.  
  1061.  
  1062. resource rControlList (LineEditWindow) {
  1063.  {
  1064.  LineEditTextID,
  1065.  LineEdit6,
  1066.  LineEdit5,
  1067.  LineEdit4,
  1068.  LineEdit3,
  1069.  LineEdit2,
  1070.  LineEdit1
  1071.  };
  1072. };
  1073.  
  1074.  
  1075. resource rControlTemplate (LineEditTextID) {
  1076.  LineEditTextID, /* control ID */
  1077.  {2,4,52,460}, /* control rectangle */
  1078.  EditTextControl{{ /* control type */
  1079.  0x0000, /* flag */
  1080.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr, /* more flags */
  1081.  0, /* ref con */
  1082.  fReadOnly+fDrawBounds+fTabSwitch, /* text flags */
  1083.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  1084.  0xFFFFFFFF, /* Vert Bar */
  1085.  0, /* Vert Amount */
  1086.  0, /* hor bar */
  1087.  0, /* hor Amount */
  1088.  0, /* style ref */
  1089.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  1090.  LineEditTextID, /* text ref */
  1091.  0 /* text length */
  1092.  
  1093.  }};
  1094. }; 
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101. /* The static text for list window */
  1102. resource rText (LineEditTextID) {
  1103.  "The following six line edit fields are all defined in resources. All the "
  1104.  "typing, mouse tracking and tabbing is handled by the toolbox. The application "
  1105.  "does not have to do anything until it wants to read what is in the fields. Note, the "
  1106.  "fifth item is set up to work as a password item. The characters you type are not echoed "
  1107.  "but they are collected correctly."
  1108. };
  1109.  
  1110.  
  1111. resource rControlTemplate (LineEdit1) {
  1112.  0, /* control ID */
  1113.  {LELine1,LELeft1,LELine1+LEHeight,LELeft1+LEWidth}, /* control rectangle */
  1114.  EditLineControl{{ /* control type */
  1115.  0, /* Flag */
  1116.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1117.  0, /* ref con */
  1118.  40, /* Max Length */
  1119.  LineEdit1 /* Initial Value Ref */
  1120.  }};
  1121. }; 
  1122.  
  1123. resource rPString (LineEdit1) {
  1124.  "First Line Edit Item"
  1125.  };
  1126.  
  1127. resource rControlTemplate (LineEdit2) {
  1128.  0, /* control ID */
  1129.  {LELine1,LELeft2,LELine1+LEHeight,LELeft2+LEWidth}, /* control rectangle */
  1130.  EditLineControl{{ /* control type */
  1131.  0, /* Flag */
  1132.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1133.  0, /* ref con */
  1134.  40, /* Max Length */
  1135.  LineEdit2 /* Initial Value Ref */
  1136.  }};
  1137. }; 
  1138.  
  1139. resource rPString (LineEdit2) {
  1140.  "Second Line Edit Item"
  1141.  };
  1142.  
  1143.  
  1144. resource rControlTemplate (LineEdit3) {
  1145.  0, /* control ID */
  1146.  {LELine2,LELeft1,LELine2+LEHeight,LELeft1+LEWidth }, /* control rectangle */
  1147.  EditLineControl{{ /* control type */
  1148.  0, /* Flag */
  1149.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1150.  0, /* ref con */
  1151.  40, /* Max Length */
  1152.  LineEdit3 /* Initial Value Ref */
  1153.  }};
  1154. }; 
  1155.  
  1156. resource rPString (LineEdit3) {
  1157.  "Third Line Edit Item"
  1158.  };
  1159.  
  1160.  
  1161. resource rControlTemplate (LineEdit4) {
  1162.  0, /* control ID */
  1163.  {LELine2,LELeft2,LELine2+LEHeight,LELeft2+LEWidth}, /* control rectangle */
  1164.  EditLineControl{{ /* control type */
  1165.  0, /* Flag */
  1166.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1167.  0, /* ref con */
  1168.  40, /* Max Length */
  1169.  LineEdit4 /* Initial Value Ref */
  1170.  }};
  1171. }; 
  1172.  
  1173. resource rPString (LineEdit4) {
  1174.  "Fourth Line Edit Item"
  1175.  };
  1176.  
  1177.  
  1178. resource rControlTemplate (LineEdit5) {
  1179.  0, /* control ID */
  1180.  {LELine3,LELeft1,LELine3+LEHeight,LELeft1+LEWidth}, /* control rectangle */
  1181.  EditLineControl{{ /* control type */
  1182.  0, /* Flag */
  1183.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1184.  0, /* ref con */
  1185.  40+$8000, /* Max Length */
  1186.  LineEdit5 /* Initial Value Ref */
  1187.  }};
  1188. }; 
  1189.  
  1190. resource rPString (LineEdit5) {
  1191.  "Fifth Line Edit Item"
  1192.  };
  1193.  
  1194.  
  1195. resource rControlTemplate (LineEdit6) {
  1196.  0, /* control ID */
  1197.  {LELine3,LELeft2,LELine3+LEHeight,LELeft2+LEWidth}, /* control rectangle */
  1198.  EditLineControl{{ /* control type */
  1199.  0, /* Flag */
  1200.  fctlProcNotPtr+RefIsResource, /* More Flags */
  1201.  0, /* ref con */
  1202.  40, /* Max Length */
  1203.  LineEdit6 /* Initial Value Ref */
  1204.  }};
  1205. }; 
  1206.  
  1207. resource rPString (LineEdit6) {
  1208.  "Sixth Line Edit Item"
  1209.  };
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217. /*---------------------------------------------------------------------------*/
  1218. /*
  1219. /* Pictures...
  1220. /*
  1221. /* The List window uses ID's in the $6000 range.
  1222. /*
  1223. /*---------------------------------------------------------------------------*/
  1224.  
  1225. #define PictureTextID $6001
  1226. #define Pic1 $6002
  1227.  
  1228. resource rWindParam1 (PictureWindow) {
  1229.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  1230.  PictureWindow, /* title ID */
  1231.  0, /* ref Con */
  1232.  {0,0,0,0}, /* Zoom Rect */
  1233.  0, /* color table id */
  1234.  {0,0}, /* origin */
  1235.  {400,640}, /* data size */
  1236.  {200,640}, /* max height-width */
  1237.  {1,1}, /* scroll amount, hor,ver */
  1238.  {0,0}, /* page amount */
  1239.  0, /* wInfo Ref Con */
  1240.  0, /* wInfo height */
  1241.  {50,50,120,260}, /* window Position */
  1242.  infront, /* wPlane */
  1243.  PictureWindow, /* Control Ref */
  1244.  refIsResource*0x0100+resourceToResource /* descriptor */
  1245. };
  1246.  
  1247.  
  1248.  
  1249. resource rpString (PictureWindow) {
  1250.  "Pictures Window"
  1251. };
  1252.  
  1253.  
  1254. resource rControlList (PictureWindow) {
  1255.  {
  1256.  PictureTextID,
  1257.  Pic1
  1258.  };
  1259. };
  1260.  
  1261. /* Template for static text in main window */
  1262. resource rControlTemplate (PictureTextID) {
  1263.  PictureTextID, /* control ID */
  1264.  {2,4,48,460}, /* control rectangle */
  1265.  StatTextControl{{ /* control type */
  1266.  0xFF00, /* flag */
  1267.  0x1002, /* more flags */
  1268.  0, /* ref con */
  1269.  PictureTextID /* title ref */
  1270.  }};
  1271. }; 
  1272.  
  1273. /* The static text for list window */
  1274. resource rTextForLETextBox2 (PictureTextID) {
  1275.  "You can also make picture controls. Pictures are collections of QuickDraw "
  1276.  "commands that are all drawn at once. They can contain most any drawing command "
  1277.  "including text, color, and special fonts."
  1278. };
  1279.  
  1280.  
  1281. resource rControlTemplate (Pic1) {
  1282.  Pic1, /* control ID */
  1283.  {50,2,150,202}, /* control rectangle */
  1284.  PictureControl{{ /* control type */
  1285.  0xFF00, /* flag */
  1286.  0x1002, /* more flags */
  1287.  0, /* ref con */
  1288.  Pic1 /* title ref */
  1289.  }};
  1290. }; 
  1291.  
  1292. data rPicture (Pic1) {
  1293.  $"80 00 00 00 00 00 8F 00 38 01 11 82 01 00 0A 00" /* A.....e.8..C.... */
  1294.  $"01 C0 01 C0 FF 3F FF 3F 51 00 05 00 0A 00 8A 00" /* .?.?.?.?Q.....a. */
  1295.  $"2E 01 53 00 0A 00 14 00 85 00 24 01 53 00 0F 00" /* ..S.....O.$.S... */
  1296.  $"1E 00 80 00 1A 01 53 00 14 00 28 00 7B 00 10 01" /* ..A...S...(.{... */
  1297.  $"53 00 19 00 32 00 76 00 06 01 53 00 1E 00 3C 00" /* S...2.v...S...<. */
  1298.  $"71 00 FC 00 53 00 23 00 46 00 6C 00 F2 00 53 00" /* q...S.#.F.l...S. */
  1299.  $"28 00 50 00 67 00 E8 00 53 00 2D 00 5A 00 62 00" /* (.P.g...S.-.Z.b. */
  1300.  $"DE 00" /* .. */
  1301. };
  1302.  
  1303.  
  1304.  
  1305. /*---------------------------------------------------------------------------*/
  1306. /*
  1307. /* PopUps...
  1308. /*
  1309. /* The List window uses ID's in the $7000 range.
  1310. /*
  1311. /*---------------------------------------------------------------------------*/
  1312.  
  1313. #define PopUpTextID $7001
  1314. #define PopUp1 $7100
  1315. #define PopUp2 $7200
  1316. #define PopUp1Item1 $7101
  1317. #define PopUp1Item2 $7102
  1318. #define PopUp1Item3 $7103
  1319. #define PopUp2Item1 $7201
  1320. #define PopUp2Item2 $7202
  1321. #define PopUp2Item3 $7203
  1322. #define PopUp2Item4 $7204
  1323. #define PopUp2Item5 $7205
  1324. #define PopUp2Item6 $7206
  1325. #define PopUp2Item7 $7207
  1326. #define PopUp2Item8 $7208
  1327. #define PopUp2Item9 $7209
  1328.  
  1329. resource rWindParam1 (PopUpWindow) {
  1330.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  1331.  PopUpWindow, /* title ID */
  1332.  0, /* ref Con */
  1333.  {0,0,0,0}, /* Zoom Rect */
  1334.  0, /* color table id */
  1335.  {0,0}, /* origin */
  1336.  {400,640}, /* data size */
  1337.  {200,640}, /* max height-width */
  1338.  {1,1}, /* scroll amount, hor,ver */
  1339.  {0,0}, /* page amount */
  1340.  0, /* wInfo Ref Con */
  1341.  0, /* wInfo height */
  1342.  {50,50,120,260}, /* window Position */
  1343.  infront, /* wPlane */
  1344.  PopUpWindow, /* Control Ref */
  1345.  refIsResource*0x0100+resourceToResource /* descriptor */
  1346. };
  1347.  
  1348.  
  1349.  
  1350. resource rpString (PopUpWindow) {
  1351.  "PopUps Window"
  1352. };
  1353.  
  1354.  
  1355. resource rControlList (PopUpWindow) {
  1356.  {
  1357.  PopUpTextID,
  1358.  PopUp1,
  1359.  PopUp2
  1360.  };
  1361. };
  1362.  
  1363. /* Template for static text in main window */
  1364. resource rControlTemplate (PopUpTextID) {
  1365.  PopUpTextID, /* control ID */
  1366.  {2,4,48,460}, /* control rectangle */
  1367.  StatTextControl{{ /* control type */
  1368.  0xFF00, /* flag */
  1369.  0x1002, /* more flags */
  1370.  0, /* ref con */
  1371.  PopUpTextID /* title ref */
  1372.  }};
  1373. }; 
  1374.  
  1375. /* The static text for list window */
  1376. resource rTextForLETextBox2 (PopUpTextID) {
  1377.  "This window contains two pop up menus. The first menu has three items and "
  1378.  "is constrained to pop up inside the window. The second has nine items and "
  1379.  "can pop up outside the window. The first pop-up is a type 1 pop-up while "
  1380.  "the second is a type 2."
  1381. };
  1382.  
  1383.  
  1384.  
  1385. resource rControlTemplate (PopUp1) {
  1386.  PopUpTextID, /* control ID */
  1387.  {50,50,0,0}, /* control rectangle */
  1388.  PopUpControl{{ /* control type */
  1389.  fInWindowOnly, /* flags */
  1390.  fctlProcNotPtr+RefIsResource, /* MoreFlags */
  1391.  0, /* RefCon */
  1392.  0, /* Title Width */
  1393.  PopUp1, /* Menu ref */
  1394.  PopUp1Item1 /* Initial Value */
  1395.  }}
  1396. };
  1397.  
  1398.  
  1399.  
  1400. resource rMenu (PopUp1) {
  1401.  PopUp1,  /* id of menu */
  1402.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache, /* menu flags */
  1403.  PopUp1,  /* id of title string */
  1404.  { PopUp1Item1,PopUp1Item2,PopUp1Item3 }; /* id's of items */
  1405. };
  1406.  
  1407. resource rPString (PopUp1) {
  1408.  "Pop-up One "
  1409. };
  1410.  
  1411.  
  1412. resource rMenuItem (PopUp1Item1) {
  1413.  PopUp1Item1,
  1414.  "","",
  1415.  0,
  1416.  RefIsResource*ItemTitleRefShift+fXOR,
  1417.  PopUp1Item1
  1418. };
  1419. resource rPString (PopUp1Item1) {
  1420.  "Pop-up One: Item 1"
  1421. };
  1422.  
  1423.  
  1424. resource rMenuItem (PopUp1Item2) {
  1425.  PopUp1Item2,
  1426.  "","",
  1427.  0,
  1428.  RefIsResource*ItemTitleRefShift+fXOR,
  1429.  PopUp1Item2
  1430. };
  1431. resource rPString (PopUp1Item2) {
  1432.  "Pop-up One: Item 2"
  1433. };
  1434.  
  1435.  
  1436. resource rMenuItem (PopUp1Item3) {
  1437.  PopUp1Item3,
  1438.  "","",
  1439.  0,
  1440.  RefIsResource*ItemTitleRefShift+fXOR,
  1441.  PopUp1Item3
  1442. };
  1443. resource rPString (PopUp1Item3) {
  1444.  "Pop-up One: Item 3"
  1445. };
  1446.  
  1447.  
  1448.  
  1449.  
  1450. resource rControlTemplate (PopUp2) {
  1451.  PopUp2, /* control ID */
  1452.  {80,50,0,0}, /* control rectangle */
  1453.  PopUpControl{{ /* control type */
  1454.  fType2PopUp, /* flags */
  1455.  fctlProcNotPtr+RefIsResource, /* MoreFlags */
  1456.  0, /* RefCon */
  1457.  0, /* Title Width */
  1458.  PopUp2, /* Menu ref */
  1459.  PopUp2Item1 /* Initial Value */
  1460.  }}
  1461. };
  1462.  
  1463.  
  1464.  
  1465.  
  1466. resource rMenu (PopUp2) {
  1467.  PopUp2,  /* id of menu */
  1468.  RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache, /* menu flags */
  1469.  PopUp2,  /* id of title string */
  1470.  { PopUp2Item1,
  1471.  PopUp2Item2,
  1472.  PopUp2Item3,
  1473.  PopUp2Item4,
  1474.  Popup2Item5,
  1475.  Popup2Item6,
  1476.  Popup2Item7, 
  1477.  Popup2Item8, 
  1478.  Popup2Item9
  1479.  }; /* id's of items */
  1480. };
  1481.  
  1482. resource rPString (PopUp2) {
  1483.  "Pop-up Two "
  1484. };
  1485.  
  1486.  
  1487. resource rMenuItem (PopUp2Item1) {
  1488.  PopUp2Item1,
  1489.  "","",
  1490.  0,
  1491.  RefIsResource*ItemTitleRefShift+fXOR,
  1492.  PopUp2Item1
  1493. };
  1494. resource rPString (PopUp2Item1) {
  1495.  "Pop-up Two: Item 1"
  1496. };
  1497.  
  1498.  
  1499. resource rMenuItem (PopUp2Item2) {
  1500.  PopUp2Item2,
  1501.  "","",
  1502.  0,
  1503.  RefIsResource*ItemTitleRefShift+fXOR,
  1504.  PopUp2Item2
  1505. };
  1506. resource rPString (PopUp2Item2) {
  1507.  "Pop-up Two: Item 2"
  1508. };
  1509.  
  1510.  
  1511. resource rMenuItem (PopUp2Item3) {
  1512.  PopUp2Item3,
  1513.  "","",
  1514.  0,
  1515.  RefIsResource*ItemTitleRefShift+fXOR,
  1516.  PopUp2Item3
  1517. };
  1518. resource rPString (PopUp2Item3) {
  1519.  "Pop-up Two: Item 3"
  1520. };
  1521.  
  1522. resource rMenuItem (PopUp2Item4) {
  1523.  PopUp2Item4,
  1524.  "","",
  1525.  0,
  1526.  RefIsResource*ItemTitleRefShift+fXOR,
  1527.  PopUp2Item4
  1528. };
  1529. resource rPString (PopUp2Item4) {
  1530.  "Pop-up Two: Item 4"
  1531. };
  1532.  
  1533. resource rMenuItem (PopUp2Item5) {
  1534.  PopUp2Item5,
  1535.  "","",
  1536.  0,
  1537.  RefIsResource*ItemTitleRefShift+fXOR,
  1538.  PopUp2Item5
  1539. };
  1540. resource rPString (PopUp2Item5) {
  1541.  "Pop-up Two: Item 5"
  1542. };
  1543.  
  1544. resource rMenuItem (PopUp2Item6) {
  1545.  PopUp2Item6,
  1546.  "","",
  1547.  0,
  1548.  RefIsResource*ItemTitleRefShift+fXOR,
  1549.  PopUp2Item6
  1550. };
  1551. resource rPString (PopUp2Item6) {
  1552.  "Pop-up Two: Item 6"
  1553. };
  1554.  
  1555. resource rMenuItem (PopUp2Item7) {
  1556.  PopUp2Item7,
  1557.  "","",
  1558.  0,
  1559.  RefIsResource*ItemTitleRefShift+fXOR,
  1560.  PopUp2Item7
  1561. };
  1562. resource rPString (PopUp2Item7) {
  1563.  "Pop-up Two: Item 7"
  1564. };
  1565.  
  1566. resource rMenuItem (PopUp2Item8) {
  1567.  PopUp2Item8,
  1568.  "","",
  1569.  0,
  1570.  RefIsResource*ItemTitleRefShift+fXOR,
  1571.  PopUp2Item8
  1572. };
  1573. resource rPString (PopUp2Item8) {
  1574.  "Pop-up Two: Item 8"
  1575. };
  1576.  
  1577. resource rMenuItem (PopUp2Item9) {
  1578.  PopUp2Item9,
  1579.  "","",
  1580.  0,
  1581.  RefIsResource*ItemTitleRefShift+fXOR,
  1582.  PopUp2Item9
  1583. };
  1584. resource rPString (PopUp2Item9) {
  1585.  "Pop-up Two: Item 9"
  1586. };
  1587.  
  1588.  
  1589.  
  1590. /*---------------------------------------------------------------------------*/
  1591. /*
  1592. /* TextEdits...
  1593. /*
  1594. /* The textedit window uses ID's in the $8000 range.
  1595. /*
  1596. /*---------------------------------------------------------------------------*/
  1597.  
  1598. #define TextEditTextID $8001
  1599. #define TextEdit1 $8002
  1600. #define TextEdit2 $8003
  1601.  
  1602. resource rWindParam1 (TextEditWindow) {
  1603.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  1604.  TextEditWindow, /* title ID */
  1605.  0, /* ref Con */
  1606.  {0,0,0,0}, /* Zoom Rect */
  1607.  0, /* color table id */
  1608.  {0,0}, /* origin */
  1609.  {400,640}, /* data size */
  1610.  {200,640}, /* max height-width */
  1611.  {1,1}, /* scroll amount, hor,ver */
  1612.  {0,0}, /* page amount */
  1613.  0, /* wInfo Ref Con */
  1614.  0, /* wInfo height */
  1615.  {50,50,120,260}, /* window Position */
  1616.  infront, /* wPlane */
  1617.  TextEditWindow, /* Control Ref */
  1618.  refIsResource*0x0100+resourceToResource /* descriptor */
  1619. };
  1620.  
  1621.  
  1622.  
  1623. resource rpString (TextEditWindow) {
  1624.  "TextEdits Window"
  1625. };
  1626.  
  1627.  
  1628. resource rControlList (TextEditWindow) {
  1629.  {
  1630.  TextEditTextID,
  1631.  TextEdit2,
  1632.  TextEdit1,
  1633.  0
  1634.  };
  1635. };
  1636.  
  1637. /* Template for static text in main window */
  1638. resource rControlTemplate (TextEditTextID) {
  1639.  TextEditTextID, /* control ID */
  1640.  {2,4,48,460}, /* control rectangle */
  1641.  StatTextControl{{ /* control type */
  1642.  0xFF00, /* flag */
  1643.  0x1002, /* more flags */
  1644.  0, /* ref con */
  1645.  TextEditTextID /* title ref */
  1646.  }};
  1647. }; 
  1648.  
  1649.  
  1650.  
  1651. /* The static text for list window */
  1652. resource rTextForLETextBox2 (TextEditTextID) {
  1653.  "Two text edit fields."
  1654. };
  1655.  
  1656.  
  1657. resource rControlTemplate (TextEdit1) {
  1658.  TextEdit1, /* control ID */
  1659.  {50,4,100,460}, /* control rectangle */
  1660.  EditTextControl{{ /* control type */
  1661.  0x0000, /* flag */
  1662.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr, /* more flags */
  1663.  0, /* ref con */
  1664.  fSmartCutPaste+fTabSwitch+fDrawBounds, /* text flags */
  1665.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  1666.  0xFFFFFFFF, /* Vert Bar */
  1667.  0, /* Vert Amount */
  1668.  0, /* hor bar */
  1669.  0, /* hor Amount */
  1670.  0, /* style ref */
  1671.  dataIsPString+RefIsResource*8, /* text descriptor */
  1672.  TextEdit1, /* text ref */
  1673.  0 /* text length */
  1674.  
  1675.  }};
  1676. }; 
  1677.  
  1678.  
  1679. resource rPString (TextEdit1) {
  1680.  "This is a pString that you can edit."
  1681. };
  1682.  
  1683. resource rCString (TextEdit1) {
  1684.  "This is a cstring that you can edit."
  1685. };
  1686.  
  1687. resource rText (TextEdit1) {
  1688.  "This is a text block you can edit."
  1689. };
  1690.  
  1691.  
  1692. resource rControlTemplate (TextEdit2) {
  1693.  TextEdit1, /* control ID */
  1694.  {110,4,150,460}, /* control rectangle */
  1695.  EditTextControl{{ /* control type */
  1696.  0x0000, /* flag */
  1697.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr, /* more flags */
  1698.  0, /* ref con */
  1699.  fSmartCutPaste+fTabSwitch+fDrawBounds, /* text flags */
  1700.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  1701.  0xFFFFFFFF, /* Vert Bar */
  1702.  0, /* Vert Amount */
  1703.  0, /* hor bar */
  1704.  0, /* hor Amount */
  1705.  0, /* style ref */
  1706.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  1707.  TextEdit2, /* text ref */
  1708.  0 /* text length */
  1709.  
  1710.  
  1711.  
  1712.  }};
  1713. }; 
  1714.  
  1715.  
  1716. /* The static text for list window */
  1717. resource rText (TextEdit2) {
  1718.  "More text. Will it tab?"
  1719. };
  1720.  
  1721.  
  1722.  
  1723. /*---------------------------------------------------------------------------*/
  1724. /*
  1725. /* Lists...
  1726. /*
  1727. /* The List window uses ID's in the $9000 range.
  1728. /*
  1729. /*---------------------------------------------------------------------------*/
  1730.  
  1731. resource rWindParam1 (ListWindow) {
  1732.  fTitle+fMove+fZoom+fGrow+fBScroll+fRScroll+fClose, /* Frame Bits */
  1733.  ListWindow, /* title ID */
  1734.  0, /* ref Con */
  1735.  {0,0,0,0}, /* Zoom Rect */
  1736.  0, /* color table id */
  1737.  {0,0}, /* origin */
  1738.  {400,640}, /* data size */
  1739.  {200,640}, /* max height-width */
  1740.  {1,1}, /* scroll amount, hor,ver */
  1741.  {0,0}, /* page amount */
  1742.  0, /* wInfo Ref Con */
  1743.  0, /* wInfo height */
  1744.  {50,50,120,260}, /* window Position */
  1745.  infront, /* wPlane */
  1746.  ListWindow, /* Control Ref */
  1747.  refIsResource*0x0100+resourceToResource /* descriptor */
  1748. };
  1749.  
  1750.  
  1751.  
  1752. resource rpString (ListWindow) {
  1753.  "Lists Window"
  1754. };
  1755.  
  1756.  
  1757. #define ListID $9000
  1758. #define ListTextID $9001
  1759.  
  1760. /* List of all controls in Main Window */
  1761.  
  1762. resource rControlList (ListWindow) {
  1763.  {
  1764.  ListID,
  1765.  ListTextID,
  1766.  0
  1767.  };
  1768. };
  1769.  
  1770. /* Template for static text in main window */
  1771. resource rControlTemplate (ListTextID) {
  1772.  ListTextID, /* control ID */
  1773.  {2,4,48,460}, /* control rectangle */
  1774.  StatTextControl{{ /* control type */
  1775.  0xFF00, /* flag */
  1776.  0x1002, /* more flags */
  1777.  0, /* ref con */
  1778.  ListTextID, /* title ref */
  1779.  0 /* text size (not used) */
  1780.  }};
  1781. }; 
  1782.  
  1783. /* The static text for list window */
  1784. resource rTextForLETextBox2 (ListTextID) {
  1785.  "This list is defined and contained entirely in resources. "
  1786.  "The strings in the list are also resources."
  1787. };
  1788. resource rControlTemplate (ListID) {
  1789.  ListID, /* Control ID */
  1790.  {50,50,152,350}, /* list rectangle */
  1791.  ListControl{{ /* list type */
  1792.  0, /* flag */
  1793.  0x1002, /* more flags */
  1794.  0, /* ref con */
  1795.  16, /* Num Members in list */
  1796.  0, /* list view (let list mgr calc) */
  1797.  0, /* List type */
  1798.  1, /* list start (start at top ) */
  1799.  10, /* ListMemHeight */
  1800.  5, /* ListMemSize */
  1801.  ListID /* ListRef (ID of list record) */
  1802.  }};
  1803. }; 
  1804.  
  1805. resource rListRef (ListID) {
  1806.  { 0x9001,memNormal,
  1807.  0x9002,memSelected,
  1808.  0x9003,memDisabled,
  1809.  0x9004,memNormal,
  1810.  0x9005,memNormal,
  1811.  0x9006,memNormal,
  1812.  0x9007,memNormal,
  1813.  0x9008,memNormal,
  1814.  0x9009,memNormal,
  1815.  0x900A,memNormal,
  1816.  0x900B,memNormal,
  1817.  0x900C,memNormal,
  1818.  0x900D,memNormal,
  1819.  0x900E,memNormal,
  1820.  0x900F,memNormal,
  1821.  0x9010,memNormal
  1822.  };
  1823. };
  1824.  
  1825.  
  1826. resource rpString (0x9001) {
  1827.  "Item One"
  1828. };
  1829. resource rpString (0x9002) {
  1830.  "Item Two"
  1831. };
  1832. resource rpString (0x9003) {
  1833.  "Item Three"
  1834. };
  1835. resource rpString (0x9004) {
  1836.  "Item Four"
  1837. };
  1838. resource rpString (0x9005) {
  1839.  "Item Five"
  1840. };
  1841. resource rpString (0x9006) {
  1842.  "Item Six"
  1843. };
  1844. resource rpString (0x9007) {
  1845.  "Item Seven"
  1846. };
  1847. resource rpString (0x9008) {
  1848.  "Item Eight"
  1849. };
  1850. resource rpString (0x9009) {
  1851.  "Item Nine"
  1852. };
  1853. resource rpString (0x900A) {
  1854.  "Item Ten"
  1855. };
  1856. resource rpString (0x900B) {
  1857.  "Item Eleven"
  1858. };
  1859. resource rpString (0x900C) {
  1860.  "Item Twelve"
  1861. };
  1862. resource rpString (0x900D) {
  1863.  "Item Thirteen"
  1864. };
  1865. resource rpString (0x900E) {
  1866.  "Item Fourteen"
  1867. };
  1868. resource rpString (0x900F) {
  1869.  "Item Fifteen"
  1870. };
  1871. resource rpString (0x9010) {
  1872.  "Item Sixteen"
  1873. };
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881. /*********************************************************************/
  1882. /*
  1883. /* Menus
  1884. /*
  1885. /*********************************************************************/
  1886.  
  1887. #define AppleMenuID $1100
  1888. #define FileMenuID $1200
  1889. #define EditMenuID $1300
  1890.  
  1891. #define AboutID $1101
  1892.  
  1893. #define CloseID 255
  1894. #define QuitID $1202
  1895.  
  1896.  
  1897. #define UndoID 250
  1898. #define CutID 251
  1899. #define CopyID 252
  1900. #define PasteID 253
  1901. #define ClearID 254
  1902.  
  1903.  
  1904.  
  1905. resource rMenuBar ($1000) {
  1906.  {
  1907.  AppleMenuID,
  1908.  FileMenuID,
  1909.  EditMenuID,
  1910.  };
  1911. };
  1912.  
  1913. resource rMenu (AppleMenuID) {
  1914.  AppleMenuID,
  1915.  0xA008,
  1916.  AppleMenuID,
  1917.  { AboutID };
  1918. };
  1919.  
  1920. resource rMenu (FileMenuID) {
  1921.  FileMenuID,
  1922.  0xA008,
  1923.  FileMenuID,
  1924.  { CloseID,
  1925.  QuitID };
  1926. };
  1927.  
  1928. resource rMenu (EditMenuID) {
  1929.  EditMenuID,
  1930.  0xA008,
  1931.  EditMenuID,
  1932.  { 
  1933.  UndoID,
  1934.  CutID,
  1935.  CopyID,
  1936.  PasteID,
  1937.  ClearID 
  1938.  };
  1939.  };
  1940.  
  1941. resource rMenuItem (AboutID) {
  1942.  AboutID,
  1943.  "","",
  1944.  0,
  1945.  0x8040,
  1946.  AboutID
  1947. };
  1948.  
  1949. resource rMenuItem (UndoID) {
  1950.  UndoID,
  1951.  "","",
  1952.  0,
  1953.  0x8000,
  1954.  UndoID
  1955. };
  1956.  
  1957. resource rMenuItem (CutID) {
  1958.  CutID,
  1959.  "X","x",
  1960.  0,
  1961.  0x8000,
  1962.  CutID
  1963. };
  1964.  
  1965. resource rMenuItem (CopyID) {
  1966.  CopyID,
  1967.  "C","c",
  1968.  0,
  1969.  0x8000,
  1970.  CopyID
  1971. };
  1972.  
  1973. resource rMenuItem (PasteID) {
  1974.  PasteID,
  1975.  "V","v",
  1976.  0,
  1977.  0x8000,
  1978.  PasteID
  1979. };
  1980.  
  1981. resource rMenuItem (ClearID) {
  1982.  ClearID,
  1983.  "","",
  1984.  0,
  1985.  0x8000,
  1986.  ClearID
  1987. };
  1988.  
  1989. resource rMenuItem (CloseID) {
  1990.  CloseID,
  1991.  "W","w",
  1992.  0,
  1993.  0x8000,
  1994.  CloseID
  1995. };
  1996.  
  1997. resource rMenuItem (QuitID) {
  1998.  QuitID,
  1999.  "Q","q",
  2000.  0,
  2001.  0x8000,
  2002.  QuitID
  2003. };
  2004.  
  2005.  
  2006. resource rPString (AppleMenuID) {
  2007.  "@"
  2008.  };
  2009. resource rPString (FileMenuID) {
  2010.  " File "
  2011.  };
  2012. resource rPString (EditMenuID) {
  2013.  " Edit "
  2014.  };
  2015. resource rPString (AboutID) {
  2016.  "About BusyBox..."
  2017.  };
  2018. resource rPString (CloseID) {
  2019.  "Close"
  2020.  };
  2021. resource rPString (UndoID) {
  2022.  "Undo"
  2023.  };
  2024. resource rPString (CutID) {
  2025.  "Cut"
  2026.  };
  2027. resource rPString (CopyID) {
  2028.  "Copy"
  2029.  };
  2030. resource rPString (PasteID) {
  2031.  "Paste"
  2032.  };
  2033. resource rPString (ClearID) {
  2034.  "Clear"
  2035.  };
  2036. resource rPString (QuitID) {
  2037.  "Quit"
  2038.  };
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052. /*---------------------------------------------------------------------------*/
  2053. /*
  2054. /* Program...
  2055. /*
  2056. /* The program windows use ID's in the $A000 range
  2057. /*
  2058. /*---------------------------------------------------------------------------*/
  2059.  
  2060. #define Program1 $A001
  2061. #define Program2 $A002
  2062. #define Program3 $A003
  2063. #define Program4 $A004
  2064. #define Program5 $A005
  2065. #define Program6 $A006
  2066.  
  2067. resource rWindParam1 (Prog1Window) {
  2068.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2069.  Prog1Window, /* title ID */
  2070.  0, /* ref Con */
  2071.  {0,0,0,0}, /* Zoom Rect */
  2072.  0, /* color table id */
  2073.  {0,0}, /* origin */
  2074.  {400,640}, /* data size */
  2075.  {200,640}, /* max height-width */
  2076.  {1,1}, /* scroll amount, hor,ver */
  2077.  {0,0}, /* page amount */
  2078.  0, /* wInfo Ref Con */
  2079.  0, /* wInfo height */
  2080.  {30,4,180,500}, /* window Position */
  2081.  infront, /* wPlane */
  2082.  Program1, /* Control Ref */
  2083.  refIsResource*0x0100+refIsResource /* descriptor */
  2084. };
  2085.  
  2086.  
  2087.  
  2088. resource rpString (Prog1Window) {
  2089.  "Main Program"
  2090. };
  2091.  
  2092.  
  2093. resource rControlList (Program1) {
  2094.  {
  2095.  Program1,
  2096.  };
  2097. };
  2098.  
  2099.  
  2100. resource rControlTemplate (Program1) {
  2101.  TextEdit1, /* control ID */
  2102.  {0,0,0,0}, /* control rectangle */
  2103.  EditTextControl{{ /* control type */
  2104.  0x0000, /* flag */
  2105.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2106.  0, /* ref con */
  2107.  fReadOnly+fNoWordWrap, /* text flags */
  2108.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2109.  0xFFFFFFFF, /* Vert Bar */
  2110.  0, /* Vert Amount */
  2111.  0, /* hor bar */
  2112.  0, /* hor Amount */
  2113.  0, /* style ref */
  2114.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2115.  Program1, /* text ref */
  2116.  0 /* text length */
  2117.  
  2118.  
  2119.  
  2120.  }};
  2121. }; 
  2122.  
  2123. read rText (Program1) "busy.asm";
  2124.  
  2125.  
  2126. resource rWindParam1 (Prog2Window) {
  2127.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2128.  Prog2Window, /* title ID */
  2129.  0, /* ref Con */
  2130.  {0,0,0,0}, /* Zoom Rect */
  2131.  0, /* color table id */
  2132.  {0,0}, /* origin */
  2133.  {400,640}, /* data size */
  2134.  {200,640}, /* max height-width */
  2135.  {1,1}, /* scroll amount, hor,ver */
  2136.  {0,0}, /* page amount */
  2137.  0, /* wInfo Ref Con */
  2138.  0, /* wInfo height */
  2139.  {30,4,180,500}, /* window Position */
  2140.  infront, /* wPlane */
  2141.  Program2, /* Control Ref */
  2142.  refIsResource*0x0100+refIsResource /* descriptor */
  2143. };
  2144.  
  2145.  
  2146.  
  2147. resource rpString (Prog2Window) {
  2148.  "Event Unit"
  2149. };
  2150.  
  2151.  
  2152. resource rControlList (Program2) {
  2153.  {
  2154.  Program2,
  2155.  };
  2156. };
  2157.  
  2158.  
  2159. resource rControlTemplate (Program2) {
  2160.  Program2, /* control ID */
  2161.  {0,0,0,0}, /* control rectangle */
  2162.  EditTextControl{{ /* control type */
  2163.  0x0000, /* flag */
  2164.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2165.  0, /* ref con */
  2166.  fReadOnly+fNoWordWrap, /* text flags */
  2167.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2168.  0xFFFFFFFF, /* Vert Bar */
  2169.  0, /* Vert Amount */
  2170.  0, /* hor bar */
  2171.  0, /* hor Amount */
  2172.  0, /* style ref */
  2173.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2174.  Program2, /* text ref */
  2175.  0 /* text length */
  2176.  
  2177.  }};
  2178. }; 
  2179.  
  2180. read rText (Program2) "uevent.asm";
  2181.  
  2182.  
  2183. resource rWindParam1 (Prog3Window) {
  2184.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2185.  Prog3Window, /* title ID */
  2186.  0, /* ref Con */
  2187.  {0,0,0,0}, /* Zoom Rect */
  2188.  0, /* color table id */
  2189.  {0,0}, /* origin */
  2190.  {400,640}, /* data size */
  2191.  {200,640}, /* max height-width */
  2192.  {1,1}, /* scroll amount, hor,ver */
  2193.  {0,0}, /* page amount */
  2194.  0, /* wInfo Ref Con */
  2195.  0, /* wInfo height */
  2196.  {30,4,180,500}, /* window Position */
  2197.  infront, /* wPlane */
  2198.  Program3, /* Control Ref */
  2199.  refIsResource*0x0100+refIsResource /* descriptor */
  2200. };
  2201.  
  2202.  
  2203.  
  2204. resource rpString (Prog3Window) {
  2205.  "Menu Unit"
  2206. };
  2207.  
  2208.  
  2209. resource rControlList (Program3) {
  2210.  {
  2211.  Program3,
  2212.  };
  2213. };
  2214.  
  2215.  
  2216. resource rControlTemplate (Program3) {
  2217.  Program3, /* control ID */
  2218.  {0,0,0,0}, /* control rectangle */
  2219.  EditTextControl{{ /* control type */
  2220.  0x0000, /* flag */
  2221.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2222.  0, /* ref con */
  2223.  fReadOnly+fNoWordWrap, /* text flags */
  2224.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2225.  0xFFFFFFFF, /* Vert Bar */
  2226.  0, /* Vert Amount */
  2227.  0, /* hor bar */
  2228.  0, /* hor Amount */
  2229.  0, /* style ref */
  2230.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2231.  Program3, /* text ref */
  2232.  0 /* text length */
  2233.  
  2234.  }};
  2235. }; 
  2236.  
  2237. read rText (Program3) "umenu.asm";
  2238.  
  2239.  
  2240. resource rWindParam1 (Prog4Window) {
  2241.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2242.  Prog4Window, /* title ID */
  2243.  0, /* ref Con */
  2244.  {0,0,0,0}, /* Zoom Rect */
  2245.  0, /* color table id */
  2246.  {0,0}, /* origin */
  2247.  {400,640}, /* data size */
  2248.  {200,640}, /* max height-width */
  2249.  {1,1}, /* scroll amount, hor,ver */
  2250.  {0,0}, /* page amount */
  2251.  0, /* wInfo Ref Con */
  2252.  0, /* wInfo height */
  2253.  {30,4,180,500}, /* window Position */
  2254.  infront, /* wPlane */
  2255.  Program4, /* Control Ref */
  2256.  refIsResource*0x0100+refIsResource /* descriptor */
  2257. };
  2258.  
  2259.  
  2260.  
  2261. resource rpString (Prog4Window) {
  2262.  "Window Unit"
  2263. };
  2264.  
  2265.  
  2266. resource rControlList (Program4) {
  2267.  {
  2268.  Program4,
  2269.  };
  2270. };
  2271.  
  2272.  
  2273. resource rControlTemplate (Program4) {
  2274.  Program4, /* control ID */
  2275.  {0,0,0,0}, /* control rectangle */
  2276.  EditTextControl{{ /* control type */
  2277.  0x0000, /* flag */
  2278.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2279.  0, /* ref con */
  2280.  fReadOnly+fNoWordWrap, /* text flags */
  2281.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2282.  0xFFFFFFFF, /* Vert Bar */
  2283.  0, /* Vert Amount */
  2284.  0, /* hor bar */
  2285.  0, /* hor Amount */
  2286.  0, /* style ref */
  2287.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2288.  Program4, /* text ref */
  2289.  0 /* text length */
  2290.  
  2291.  }};
  2292. }; 
  2293.  
  2294. read rText (Program4) "uwindow.asm";
  2295.  
  2296.  
  2297. resource rWindParam1 (Prog5Window) {
  2298.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2299.  Prog5Window, /* title ID */
  2300.  0, /* ref Con */
  2301.  {0,0,0,0}, /* Zoom Rect */
  2302.  0, /* color table id */
  2303.  {0,0}, /* origin */
  2304.  {400,640}, /* data size */
  2305.  {200,640}, /* max height-width */
  2306.  {1,1}, /* scroll amount, hor,ver */
  2307.  {0,0}, /* page amount */
  2308.  0, /* wInfo Ref Con */
  2309.  0, /* wInfo height */
  2310.  {30,4,180,500}, /* window Position */
  2311.  infront, /* wPlane */
  2312.  Program5, /* Control Ref */
  2313.  refIsResource*0x0100+refIsResource /* descriptor */
  2314. };
  2315.  
  2316.  
  2317.  
  2318. resource rpString (Prog5Window) {
  2319.  "Utility Unit"
  2320. };
  2321.  
  2322.  
  2323. resource rControlList (Program5) {
  2324.  {
  2325.  Program5,
  2326.  };
  2327. };
  2328.  
  2329.  
  2330. resource rControlTemplate (Program5) {
  2331.  Program5, /* control ID */
  2332.  {0,0,0,0}, /* control rectangle */
  2333.  EditTextControl{{ /* control type */
  2334.  0x0000, /* flag */
  2335.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2336.  0, /* ref con */
  2337.  fReadOnly+fNoWordWrap, /* text flags */
  2338.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2339.  0xFFFFFFFF, /* Vert Bar */
  2340.  0, /* Vert Amount */
  2341.  0, /* hor bar */
  2342.  0, /* hor Amount */
  2343.  0, /* style ref */
  2344.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2345.  Program5, /* text ref */
  2346.  0 /* text length */
  2347.  
  2348.  }};
  2349. }; 
  2350.  
  2351. read rText (Program5) "uutils.asm";
  2352.  
  2353.  
  2354. resource rWindParam1 (Prog6Window) {
  2355.  fTitle+fMove+fZoom+fClose, /* Frame Bits */
  2356.  Prog6Window, /* title ID */
  2357.  0, /* ref Con */
  2358.  {0,0,0,0}, /* Zoom Rect */
  2359.  0, /* color table id */
  2360.  {0,0}, /* origin */
  2361.  {400,640}, /* data size */
  2362.  {200,640}, /* max height-width */
  2363.  {1,1}, /* scroll amount, hor,ver */
  2364.  {0,0}, /* page amount */
  2365.  0, /* wInfo Ref Con */
  2366.  0, /* wInfo height */
  2367.  {30,4,180,500}, /* window Position */
  2368.  infront, /* wPlane */
  2369.  Program6, /* Control Ref */
  2370.  refIsResource*0x0100+refIsResource /* descriptor */
  2371. };
  2372.  
  2373.  
  2374.  
  2375. resource rpString (Prog6Window) {
  2376.  "Globals Unit"
  2377. };
  2378.  
  2379.  
  2380. resource rControlList (Program6) {
  2381.  {
  2382.  Program6,
  2383.  };
  2384. };
  2385.  
  2386.  
  2387. resource rControlTemplate (Program6) {
  2388.  Program6, /* control ID */
  2389.  {0,0,0,0}, /* control rectangle */
  2390.  EditTextControl{{ /* control type */
  2391.  0x0000, /* flag */
  2392.  fCtlCanBeTarget+fCtlWantsEvents+fctlProcNotPtr+fctlTellAboutSize, /* more flags */
  2393.  0, /* ref con */
  2394.  fReadOnly+fNoWordWrap, /* text flags */
  2395.  {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, /* indent rect */
  2396.  0xFFFFFFFF, /* Vert Bar */
  2397.  0, /* Vert Amount */
  2398.  0, /* hor bar */
  2399.  0, /* hor Amount */
  2400.  0, /* style ref */
  2401.  dataIsTextBlock+RefIsResource*8, /* text descriptor */
  2402.  Program6, /* text ref */
  2403.  0 /* text length */
  2404.  
  2405.  }};
  2406. }; 
  2407.  
  2408. read rText (Program6) "uglobals.asm";
  2409.